import BaseCURDApi from '@/framework/infra/base/BaseCURDApi'

class RoleApi extends BaseCURDApi {
  constructor() {
    super('mms/role')
  }

  listAll = () => {
    return this.get('list-all')
  }
  queryRoleCodeList = (roleId) => this.get('id-list', { roleId })
  saveRoleCodeList = (roleId, codeList) => this.post('save-id-list', { roleId, codeList })
}

export const roleApi = new RoleApi()
